<?php
/**
 * Created by PhpStorm.
 * User: TomKK
 * Date: 2016/5/8
 * Time: 18:53
 */

require "utils/conn.php";

$sql = "SELECT * FROM user LEFT join classes ON (user.class_id = classes.calss_id)";
$result = mysqli_query($mysqli,$sql);

$arr = array();
while($row = mysqli_fetch_assoc($result)){
    array_push($arr,$row);
}
//print_r (mysqli_fetch_array($result,true));
//print_r (mysqli_fetch_array($result,true));
die(success(0,$arr));